import Mock from 'mockjs';
import booksData from '/public/json/shelf.json'; // 引入本地的JSON数据

import {v4 as uuidv4} from 'uuid';

// 为每本书添加 id 和 uuid
booksData.books.forEach(book => {
    book.id = uuidv4()
})

// 我的书架
Mock.mock('/api/shelf-books', 'get', () => {
    return {code: 200, data: booksData.books};
});










